#ifndef _TOOL_H_
#define _TOOL_H_

#include "cocos2d.h"
#include "BaseTooth.h"
#include "BaseBadPoint.h"

USING_NS_CC;

typedef enum tagToolState 
{
    kToolStateGrabbed,
    kToolStateUngrabbed
} ToolState; 

class Tool : public CCSprite, public CCTargetedTouchDelegate
{

	ToolState        t_state;

public:
	Tool(void);
	Tool(std::vector<BaseTooth*> twTooth);
	~Tool(void);

	Tool* pTool;
	std::vector<BaseTooth*> twTooth;
	BaseBadPoint::BadKinds fixKind;

	 CCRect rect();
    bool initWithTexture(CCTexture2D* aTexture);
    virtual void onEnter();
    virtual void onExit();
    bool containsTouchLocation(CCTouch* touch);

	int touchEndedX;
	int touchEndedY;
    virtual bool ccTouchBegan(CCTouch* touch, CCEvent* event);
    virtual void ccTouchMoved(CCTouch* touch, CCEvent* event);
    virtual void ccTouchEnded(CCTouch* touch, CCEvent* event);
    virtual CCObject* copyWithZone(CCZone *pZone);

    virtual void touchDelegateRetain();
    virtual void touchDelegateRelease();
};

#endif//_TOOL_H_

